package com.cssl.repository;

import com.cssl.domain.DtsAdmin;
import com.cssl.domain.DtsPermission;
import com.cssl.domain.dto.DtsPermissionDto;
import feign.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface PermissionRepository extends JpaRepository<DtsPermissionDto, Integer> {
    @Query(value = "SELECT * FROM dts_permission WHERE role_id IN (?1)", nativeQuery = true)
    List<DtsPermissionDto> findAllById(List<Integer> ids);
}
